<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 老猫 <thinkcmf@126.com>
// +----------------------------------------------------------------------
namespace app\portal\validate;

use think\Validate;

class AdminSeriesValidate extends Validate
{
    protected $rule =   [
        'title'             => 'require|max:80',
        'title_en'          => 'require|max:80',
        'thumbnail'         => 'require',
        'thumbnail1'        => 'require',
        'thumbnail2'        => 'require',
        'hotline'           => 'require',
        'detail'            => 'require',
        'detail_en'         => 'require',
    ];

    protected $message  =   [
        'title.require'               => '标题不能为空',
        'title.max'                   => '标题不能超多80个字符',
        'title_en.require'            => '标题（英文）不能为空',
        'title_en.max'                => '标题（英文）不能超多80个字符',
        'thumbnail.require'           => '请上传列表图',
        'thumbnail1.require'          => '请上传详情图',
        'thumbnail2.require'          => '请上传详情放大图',
        'hotline.require'             => '电话咨询不能为空',
        'detail.require'              => '详情不能为空',
        'detail_en.require'           => '详情（英文）不能为空',
    ];

    protected $scene = [
        'edit'   =>   ['title','title_en','thumbnail','thumbnail1','thumbnail2','hotline','detail','detail_en'],
    ];
}